<template>
    <div id="front">
        <div class="page-container">
            <el-container>
                <div class="el-header-wrapper">
                    <el-affix :offset="0">
                        <el-header>
                            <FrontHeaderMenu />
                        </el-header>
                    </el-affix>
                    <el-main>
                        <RouterView />
                    </el-main>
                </div>
            </el-container>
        </div>
    </div>
</template>

<script setup>
import FrontHeaderMenu from '@/components/front/home/FrontHeaderMenu.vue';
</script>

<style lang="scss" scoped>
#front {
    width: 100%;
    height: 100%;
    background-color: #f5f7fa;
    min-height: 100vh;

    .page-container {
        width: 100%;
        min-height: 100vh;
        display: flex;
        flex-direction: column;

        .el-header-wrapper {
            display: flex;
            flex-direction: column;
            min-height: 100vh;
            width: 100%;

            .el-header {
                width: 100%;
                padding: 0;
                z-index: 100;
            }
        }

        .el-main {
            flex: 1;
            width: 100%;
            max-width: 1400px;
            margin: 0 auto;
            padding: 24px;
            margin-top: 20px;
            margin-bottom: 40px;
            border-radius: 12px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
            background-color: #fff;
            position: relative;
            z-index: 1;
        }
    }
}

/* 响应式设计 */
@media (max-width: 1400px) {
    #front .page-container .el-main {
        max-width: 95%;
    }
}

@media (max-width: 768px) {
    #front .page-container .el-main {
        padding: 16px;
        margin-top: 10px;
        margin-bottom: 20px;
    }
}
</style>